package com.tang.service;

import java.time.LocalDateTime;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 模拟审核服务
 *
 * @author fulin.tang
 * @version V3.0
 * @since 2021/9/30 17:53
 */
public class AuthService {

    // 存储id与日期
    private static final Map<String, LocalDateTime> authMap = new ConcurrentHashMap<>();

    // 查询审批流程走到哪里了
    public static LocalDateTime queryAuthInfo(String uId, String orderId) {
        return authMap.get(uId.concat(orderId));
    }

    // 执行审批操作
    public static void auth(String uId, String orderId) {
        authMap.put(uId.concat(orderId), LocalDateTime.now());
    }

}
